package org.logic.linguisticSummaries.type24summaries;

import org.logic.fuzzysets.AFuzzySet;
import org.logic.linguisticSummaries.ASummary;

public class SummaryTypeTwoFour extends ASummary{

	String subject1;
	String subject2;
	AFuzzySet summarizer;
	
	public SummaryTypeTwoFour(String subject1, String subject2, AFuzzySet summarizer) {
		this.subject1 = subject1;
		this.subject2 = subject2;
		this.summarizer = summarizer;
	}
	
	@Override
	public String generateSummary() {

		double upCardinalValue = summarizer.getCardinalValue();
		double downCardinalValue = summarizer.getQualifier().getCardinalValue() + upCardinalValue;
				
		setDegreeOfTruth(upCardinalValue/(downCardinalValue));
		
		return "More"+" "+subject1+" than "+subject2+" "+ summarizer.getLabel()+". [T:"+getDegreeOfTruth()+"]";
	}
}
